#include <iostream>
using namespace std;

class Animal
{
	private :
		string m_sex;
		int m_age;
	public :
		Animal(string sex = "boy", int age = 12) :
			m_sex(sex), m_age(age)
		{}

		void set_attribute(string sex, int age)
		{
			m_sex = sex;
			m_age = age;
		}

		void get_attribute(void)
		{
			cout << "Sex : " << m_sex << endl;
			cout << "Age : " << m_age << endl;
		}
	protected :
};

int main()
{
	Animal *a = new Animal;
	Animal a1;

	a->set_attribute("girl", 13);
	a->get_attribute();

	typedef void(Animal :: *funcs)(string sex, int age);
	funcs ps = &Animal :: set_attribute;

	typedef void(Animal :: *funcg)();
	funcg pg = &Animal :: get_attribute;

	(a1.*ps)("boy", 14);
	(a1.*pg)();
}
